<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>坐标</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .box {
            margin: 0 auto;
            width: 100px;
            height: 1800px;
            background-color: darkred;
        }

        .box2 {
            margin: 5px auto;
            width: 200px;
            height: 2000px;
            background-color: teal;
        }
    </style>
</head>

<body>
    <div class="box2">
        <div class="box">
        </div>
    </div>

    <script>
        var box = document.getElementsByClassName("box")[0];
        box.addEventListener("click", function (e) {
            console.log(`clientX:${e.clientX}---clientY:${e.clientY}`);
            console.log(`pageX:${e.pageX}---pageY:${e.pageY}`);
            console.log(`screenX:${e.screenX}---screenY:${e.screenY}`);
        })
    </script>
</body>

</html>